package com.lkd.mapper;

import com.lkd.dto.VmTypePageDto;
import com.lkd.entity.VmType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VmTypeMapper {

    @Select("select * from lkdremake.tb_vm_type where type_id=#{vmType}")
    VmType getByVmType(int vmType);
    //查询所有
    List<VmType> list(VmTypePageDto vmTypePageDto);
    //新增设备类型
    @Insert("insert into lkdremake.tb_vm_type values (null,#{vmRow},#{vmCol},#{name},#{channelMaxCapacity},#{model},#{image})")
    Boolean save(VmType vmType);

    //修改设备
    Boolean update(VmType vmType);
    //删除设备
    @Delete("delete from lkdremake.tb_vm_type where type_id=#{typeId}")
    Boolean delete(Integer typeId);
}
